﻿@model JobBookingModel
@using PresentationMVC.Models
@using Domain.Entity
<fieldset>
    <legend>Car Park Details</legend>
    @if (Model.JobBooking.CarParkDetails == null || Model.JobBooking.CarParkDetails.Count == 0)
    {
       @* <p>
            None.</p>*@
    }
    <ul id="movieEditor" style="list-style-type: none">
        @if (Model.JobBooking.CarParkDetails != null)
        {
            foreach (CarParkDetails carparkDetail in Model.JobBooking.CarParkDetails)
            {
                Html.RenderPartial("ParkingDetailEditRow", carparkDetail);
            }
        }
    </ul>
    <a id="addAnother" href="#">Add</a>
    <script type="text/javascript">
        $(function () {
            // $("#movieEditor").sortable();
            $("#addAnother").click(function () {
                $.get('/Job/CarParkingEntryRow', function (template) {
                    $("#movieEditor").append(template);
                });
            });
        });
    </script>
</fieldset>

